package pers.kw.server.user.controller;

import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import pers.kw.config.annotation.RequiresLogin;
import pers.kw.config.annotation.RequiresPermissions;
import pers.kw.config.annotation.RequiresRoles;
import pers.kw.protocol.R;


@RequestMapping(value = "/crm/")
@RestController
public class TestController {

    @RequiresLogin
    @RequiresRoles(value = {"E102"})
    @RequiresPermissions(value = "web:user:add")
    @ApiOperation(value = "新增用户")
    @PutMapping(value = "/a")
    public R<String> a() {
        return R.ok(
                "a"
        );
    }

    @RequiresLogin
    @RequiresRoles(value = {"E102"})
    @RequiresPermissions(value = "web:user:add")
    @ApiOperation(value = "新增用户")
    @GetMapping(value = "/b")
    public R<String> b() {
        return R.ok(
                "b"
        );
    }
}
